import 'package:flutter/cupertino.dart';
import 'package:flutter_sample/src/bar_chart_sample.dart';
import 'package:flutter_sample/src/chart/pie_chart_demo.dart';
import 'package:flutter_sample/src/circular_seek_bar.dart';
import 'package:flutter_sample/src/custom/basic_timeline_page.dart';
import 'package:flutter_sample/src/custom/custom_page.dart';
import 'package:flutter_sample/src/custom/expandable_example_page.dart';
import 'package:flutter_sample/src/custom_painter_sample.dart';
import 'package:flutter_sample/src/date_picker_sample.dart';
import 'package:flutter_sample/src/graphic_page.dart';
import 'package:flutter_sample/src/home_page.dart';
import 'package:flutter_sample/src/module/channel/basic_message_channel_page.dart';
import 'package:flutter_sample/src/module/channel/event_channel_page.dart';
import 'package:flutter_sample/src/module/channel/method_channel_page.dart';
import 'package:flutter_sample/src/module/interactive_viewer_page.dart';
import 'package:flutter_sample/src/module/layout_builder_page.dart';
import 'package:flutter_sample/src/module/module_page.dart';
import 'package:flutter_sample/src/module/overlay_page.dart';
import 'package:flutter_sample/src/module/platform_view_page.dart';
import 'package:flutter_sample/src/pages/animation.dart';
import 'package:flutter_sample/src/pages/bigdata.dart';
import 'package:flutter_sample/src/pages/crosshair.dart';
import 'package:flutter_sample/src/pages/echarts.dart';
import 'package:flutter_sample/src/pages/interaction_stream_dynamic.dart';
import 'package:flutter_sample/src/pages/interval.dart';
import 'package:flutter_sample/src/pages/line_area_point.dart';
import 'package:flutter_sample/src/pages/polygon_custom.dart';
import 'package:flutter_sample/src/percent_indicator.dart';
import 'package:flutter_sample/src/performance/frame_view.dart';
import 'package:flutter_sample/src/performance/performance_view.dart';
import 'package:flutter_sample/src/pie_chart.dart';
import 'package:flutter_sample/src/sn_progress_dialog.dart';
import 'package:go_router/go_router.dart';
import 'package:pie_chart/pie_chart.dart';

import 'custom/100days_time_scale.dart';
import 'custom/infinite_caliper.dart';
import 'custom/infinite_time_scale.dart';
import 'custom/scrollable_time_scale.dart';
import 'custom/scroller/horizontal_slider_demo.dart';
import 'module/scroller_page.dart';

final GoRouter routers = GoRouter(
  routes: <RouteBase>[
    GoRoute(
      path: '/',
      builder: (BuildContext context, GoRouterState state) {
        return HomeScreen();
      },
    ),
    GoRoute(
      path: '/custom',
      builder: (BuildContext context, GoRouterState state) {
        return CustomPage();
      },
      routes: [
        GoRoute(
          path: '/circularSeekBar',
          builder: (BuildContext context, GoRouterState state) {
            return CircularSeekBarPage();
          },
        ),
        GoRoute(
          path: '/snProgressDialog',
          builder: (BuildContext context, GoRouterState state) {
            return SnProgressDialogPage();
          },
        ),
        GoRoute(
          path: '/pieChart',
          builder: (BuildContext context, GoRouterState state) {
            return PieChartHomePage();
          },
        ),
        GoRoute(
          path: '/flBarChart',
          builder: (BuildContext context, GoRouterState state) {
            return BarChartSample();
          },
        ),
        GoRoute(
          path: '/customPainter',
          builder: (BuildContext context, GoRouterState state) {
            return CustomPainterSample();
          },
        ),
        GoRoute(
          path: '/percentIndicator',
          builder: (BuildContext context, GoRouterState state) {
            return PercentIndicator();
          },
        ),
        GoRoute(
          path: '/pie',
          builder: (BuildContext context, GoRouterState state) {
            return PieChartDemoPage();
          },
        ),
        GoRoute(
          path: '/basicTimelinePage',
          builder: (BuildContext context, GoRouterState state) {
            return BasicTimelinePage();
          },
        ),
        GoRoute(
          path: '/expandableTimelinePage',
          builder: (BuildContext context, GoRouterState state) {
            return ExpandableExamplePage();
          },
        ),
        GoRoute(
          path: '/horizontalSlider',
          builder: (BuildContext context, GoRouterState state) {
            return HorizontalSliderDemo();
          },
        ),
        GoRoute(
          path: '/caliper',
          builder: (BuildContext context, GoRouterState state) {
            return CaliperDemo();
          },
        ),
        GoRoute(
          path: '/infiniteTime',
          builder: (BuildContext context, GoRouterState state) {
            return TimeScaleDemo();
          },
        ),
        GoRoute(
          path: '/scrollableTime',
          builder: (BuildContext context, GoRouterState state) {
            return HundredDaysDemo();
          },
        ),
      ]
    ),
    GoRoute(
      path: '/datePicker',
      builder: (BuildContext context, GoRouterState state) {
        return DatePickerPage();
      },
    ),
    GoRoute(
      path: '/graphic',
      builder: (BuildContext context, GoRouterState state) {
        return GraphicPage();
      },
      routes: [
        GoRoute(
          path: '/interval',
          builder: (BuildContext context, GoRouterState state) {
            return IntervalPage();
          },
        ),
        GoRoute(
          path: '/lineAreaPoint',
          builder: (BuildContext context, GoRouterState state) {
            return LineAreaPointPage();
          },
        ),
        GoRoute(
          path: '/polygon',
          builder: (BuildContext context, GoRouterState state) {
            return PolygonCustomPage();
          },
        ),
        GoRoute(
          path: '/echarts',
          builder: (BuildContext context, GoRouterState state) {
            return EchartsPage();
          },
        ),
        GoRoute(
          path: '/interaction',
          builder: (BuildContext context, GoRouterState state) {
            return InteractionStreamDynamicPage();
          },
        ),
        GoRoute(
          path: '/animation',
          builder: (BuildContext context, GoRouterState state) {
            return AnimationPage();
          },
        ),
        GoRoute(
          path: '/animation',
          builder: (BuildContext context, GoRouterState state) {
            return AnimationPage();
          },
        ),
        GoRoute(
          path: '/crossHair',
          builder: (BuildContext context, GoRouterState state) {
            return CrosshairPage();
          },
        ),
      ]
    ),
    GoRoute(
      path: '/performance',
      builder: (BuildContext context, GoRouterState state) {
        return PerformanceView();
      },
      routes: [
        GoRoute(
          path: '/frame',
          builder: (BuildContext context, GoRouterState state) {
            return FrameView();
          },
        ),
      ]
    ),
    GoRoute(
      path: '/module',
      builder: (BuildContext context, GoRouterState state) {
        return ModulePage();
      },
      routes: [
        GoRoute(
          path: '/overlay',
          builder: (BuildContext context, GoRouterState state) {
            return OverlayPage();
          },
        ),
        GoRoute(
          path: '/layoutBuilder',
          builder: (BuildContext context, GoRouterState state) {
            return LayoutBuilderPage();
          },
        ),
        GoRoute(
          path: '/interactiveViewer',
          builder: (BuildContext context, GoRouterState state) {
            return InteractiveViewerPage();
          },
        ),
        GoRoute(
          path: '/channel/method',
          builder: (BuildContext context, GoRouterState state) {
            return MethodChannelPage();
          },
        ),
        GoRoute(
          path: '/channel/event',
          builder: (BuildContext context, GoRouterState state) {
            return EventChannelPage();
          },
        ),
        GoRoute(
          path: '/channel/basicChannel',
          builder: (BuildContext context, GoRouterState state) {
            return BasicMessageChannelPage();
          },
        ),
        GoRoute(
          path: '/platformView',
          builder: (BuildContext context, GoRouterState state) {
            return PlatformViewPage();
          },
        ),
        GoRoute(
          path: '/scrollerView',
          builder: (BuildContext context, GoRouterState state) {
            return ScrollerPage();
          },
        ),
      ]
    ),
  ],
);
